import 'package:bottom_sheet_flutter/utils/color_util/color_util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'action_bottom_sheet_widget.dart';

/// @className : action_bottom_sheet_util
/// @date 2022/07/18 18:42
/// @author : xiaohai
/// @description : 动作抽屉层工具类

class ActionBottomSheetWidgetUtil {
  /// 显示动作抽屉层
  void showActionBottomSheetWidget(BuildContext context, List<String?> actionItemList,
      {Function(String? title, int index)? actionItemEvent}) {
    showModalBottomSheet(
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.only(
            topLeft: Radius.circular(32.w),
            topRight: Radius.circular(32.w),
          ),
        ),
        backgroundColor: ColorsUtil.hexColor(0xFFFFFF),
        isScrollControlled: true,
        context: context,
        builder: (builder) {
          return ActionBottomSheetWidget(
              actionItemList: actionItemList, actionItemEvent: actionItemEvent);
        });
  }
}
